package homework_3_27;

import java.util.Scanner;

/**
 * @author Administrator
 */
public class Homework_BMI {
    public static void main(String[] args) {
        System.out.println("输入身高");
        Scanner sc=new Scanner(System.in);
        float shengao=sc.nextFloat();

        System.out.println("输入体重");
        Scanner sr=new Scanner(System.in);
        float tizhong=sr.nextFloat();
      float bmi=tizhong/(shengao*shengao);
        System.out.println(String.format("%.2f",bmi));
        if(bmi<18.5)
        {  System.out.println("太轻了，bmi是"+String.format("%.2f",bmi));}
        if(bmi<23.9&bmi>18.5)
        {  System.out.println("正常，bmi是"+String.format("%.2f",bmi));}
        if(bmi<27&bmi>24)
        {  System.out.println("过重，bmi是"+String.format("%.2f",bmi));}
        if(bmi<32&bmi>28)
        {  System.out.println("肥胖，bmi是"+String.format("%.2f",bmi));}
        if(bmi>32)
        {  System.out.println("非常肥胖，bmi是"+String.format("%.2f",bmi));}




    }
}
